﻿using System;
using System.Reflection;

namespace TeF.Runner
{
    internal abstract class TestMethodBase : TestEntityBase
    {
        protected TestMethodBase(MethodInfo methodInfo, bool ignored)
            : base(ignored)
        {
            if (methodInfo == null)
                throw new ArgumentNullException("methodInfo");

            MethodInfo = methodInfo;
        }

        public MethodInfo MethodInfo { get; private set; }

        public override string Name
        {
            get { return MethodInfo.Name; }
        }

        public Type Type
        {
            get { return MethodInfo.ReflectedType; }
        }
    }
}
